<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>面向对象</title>
</head>
<body>
    <script>
        var Foo={
            getName:function()
        {
            return 2
        }
    }
        function getName()
        
        {
            return 4
        }

        console.log(Foo.getName())
        console.log(getName())
        console.log(Foo().getName())
        console.log(new Foo.getName())
    </script>
</body>
</html>